import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from "rxjs/Observable";

/*
  Generated class for the NewForestProvider provider.

  See https://angular.io/guide/dependency-injection for more info on providers
  and Angular DI.
*/
@Injectable()
export class NewForestProvider {
    dataUrl = 'assets/data/newForest.json';

    constructor(public http: HttpClient) {
        console.log('Hello NewForestProvider Provider');
    }

    getData(): Observable<any> {
        return this.http.get(this.dataUrl).map((data) => {
            console.log(data);
            return data;
        })
    }

}
